<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <title>科室管理</title>
    <div th:insert="user/common::head"></div>
</head>

<body class="">
    <div class="wrapper ">
        <div th:insert="~{user/common::sidebar(active='department_list.html')}"></div>
        <div class="main-panel">
            <!-- Navbar导航栏 -->
            <nav th:replace="~{user/common::navbar}"></nav>
            <!-- End Navbar -->
            <div class="panel-header panel-header-sm">
            </div>
            <div class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <h4 class="card-title" style="display: inline">科室管理</h4>
                                <a th:href="@{/toDepartmentAdd}" class="btn-primary btn btn-lg text-white float-right" style="margin-right: 2rem">新增科室</a>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table class="table">
                                        <thead class="text-primary">
                                            <th>
                                                科室ID
                                            </th>
                                            <th>
                                                科室名称
                                            </th>
                                            <th>
                                                科室联系电话
                                            </th>
                                            <th>
                                                科室地址
                                            </th>
                                            <th>
                                                操作
                                            </th>
                                        </thead>
                                        <tbody>
                                            <tr th:each="department,index:${departments}">
                                                <td th:text="${department.getDepartmentId()}">
                                                    Dakota Rice
                                                </td>
                                                <td th:text="${department.getDepartmentName()}">
                                                    Niger
                                                </td>
                                                <td th:text="${department.getDepartmentPhone()}">
                                                    Oud-Turnhout
                                                </td>
                                                <td th:text="${department.getDepartmentAddress()}">
                                                    15038609250
                                                </td>
                                                <td>
                                                    <a th:href="@{/toDepartmentInfo/}+${department.getDepartmentId()}" class="btn btn-sm btn-primary">详情</a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--底部footer-->
            <footer th:replace="~{user/common::footer}"></footer>
        </div>
    </div>
</body>

<!--通用footerJs-->
<script th:replace="~{user/common::footerJs}"></script>

</html>
